﻿#region File and License Information
/*
<File>
	<License>
		Copyright © 2009 - 2017, Daniel Vaughan. All rights reserved.
		This file is part of Calcium (http://calciumsdk.net), 
		which is released under the MIT License.
		See file /Documentation/License.txt for details.
	</License>
	<CreationDate>$CreationDate$</CreationDate>
</File>
*/
#endregion

using System;
using System.Threading.Tasks;

namespace Outcoder.LauncherModel
{
	//public class Launcher
	//{
	//	readonly Action<Launcher> showAction;

	//	/// <summary>
	//	/// Initializes a new instance of the <see cref="Launcher"/> class.
	//	/// </summary>
	//	/// <param name="showAction">The action to perform 
	//	/// when the Show method is called.</param>
	//	public Launcher(Action<Launcher> showAction = null)
	//	{
	//		this.showAction = showAction;
	//	}

	//	public void Show()
	//	{
	//		Shown = true;
	//		if (showAction != null)
	//		{
	//			showAction(this);
	//		}
	//	}

	//	public bool Shown { get; set; }
	//}

	public abstract class LauncherBase<T> : ILauncher<T>
	{
		/// <summary>
		/// Initializes a new instance of the <see cref="LauncherBase"/> class.
		/// </summary>
		protected LauncherBase()
		{
		}

		public abstract Task<T> ShowAsync();
	}

	public abstract class LauncherBase : LauncherBase<bool>
	{
		/// <summary>
		/// Initializes a new instance of the <see cref="LauncherBase"/> class.
		/// </summary>
		protected LauncherBase()
		{
		}
	}

	public abstract class MockLauncherBase<T> : LauncherBase<T>
	{
		public bool Shown { get; set; }
	}

	public abstract class MockLauncherBase : MockLauncherBase<bool>
	{
		public override Task<bool> ShowAsync()
		{
			Shown = true;

			return Task.FromResult(true);
		}
	}

}
